package com.fs.erp.api.basedata.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fs.erp.mybatis.entity.BaseEntity;
import com.fs.erp.web.dto.BaseDto;
import lombok.Data;

/**
 * 商品属性
 * @TableName base_data_product_property
 */
@Data
@TableName("base_data_product_property")
public class ProductProperty extends BaseEntity implements BaseDto {
    /**
     * ID
     */
    private String id;

    /**
     * 编号
     */
    private String code;

    /**
     * 名称
     */
    private String name;

    /**
     * 是否必填
     */
    private Integer isRequired;

    /**
     * 录入类型
     */
    private Integer columnType;

    /**
     * 数据类型
     */
    private Integer columnDataType;

    /**
     * 属性类别
     */
    private Integer propertyType;

    /**
     * 状态
     */
    private Integer available;

    /**
     * 备注
     */
    private String description;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建人ID
     */
    @TableField(fill = FieldFill.INSERT)
    private String createById;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy;

    /**
     * 修改人ID
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateById;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    private static final long serialVersionUID = 1L;

//    @Override
//    public boolean equals(Object that) {
//        if (this == that) {
//            return true;
//        }
//        if (that == null) {
//            return false;
//        }
//        if (getClass() != that.getClass()) {
//            return false;
//        }
//        ProductProperty other = (ProductProperty) that;
//        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
//            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
//            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
//            && (this.getIsRequired() == null ? other.getIsRequired() == null : this.getIsRequired().equals(other.getIsRequired()))
//            && (this.getColumnType() == null ? other.getColumnType() == null : this.getColumnType().equals(other.getColumnType()))
//            && (this.getColumnDataType() == null ? other.getColumnDataType() == null : this.getColumnDataType().equals(other.getColumnDataType()))
//            && (this.getPropertyType() == null ? other.getPropertyType() == null : this.getPropertyType().equals(other.getPropertyType()))
//            && (this.getAvailable() == null ? other.getAvailable() == null : this.getAvailable().equals(other.getAvailable()))
//            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
//            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
//            && (this.getCreateById() == null ? other.getCreateById() == null : this.getCreateById().equals(other.getCreateById()))
//            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
//            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
//            && (this.getUpdateById() == null ? other.getUpdateById() == null : this.getUpdateById().equals(other.getUpdateById()))
//            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
//    }
//
//    @Override
//    public int hashCode() {
//        final int prime = 31;
//        int result = 1;
//        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
//        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
//        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
//        result = prime * result + ((getIsRequired() == null) ? 0 : getIsRequired().hashCode());
//        result = prime * result + ((getColumnType() == null) ? 0 : getColumnType().hashCode());
//        result = prime * result + ((getColumnDataType() == null) ? 0 : getColumnDataType().hashCode());
//        result = prime * result + ((getPropertyType() == null) ? 0 : getPropertyType().hashCode());
//        result = prime * result + ((getAvailable() == null) ? 0 : getAvailable().hashCode());
//        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
//        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
//        result = prime * result + ((getCreateById() == null) ? 0 : getCreateById().hashCode());
//        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
//        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
//        result = prime * result + ((getUpdateById() == null) ? 0 : getUpdateById().hashCode());
//        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
//        return result;
//    }
//
//    @Override
//    public String toString() {
//        StringBuilder sb = new StringBuilder();
//        sb.append(getClass().getSimpleName());
//        sb.append(" [");
//        sb.append("Hash = ").append(hashCode());
//        sb.append(", id=").append(id);
//        sb.append(", code=").append(code);
//        sb.append(", name=").append(name);
//        sb.append(", isRequired=").append(isRequired);
//        sb.append(", columnType=").append(columnType);
//        sb.append(", columnDataType=").append(columnDataType);
//        sb.append(", propertyType=").append(propertyType);
//        sb.append(", available=").append(available);
//        sb.append(", description=").append(description);
//        sb.append(", createBy=").append(createBy);
//        sb.append(", createById=").append(createById);
//        sb.append(", createTime=").append(createTime);
//        sb.append(", updateBy=").append(updateBy);
//        sb.append(", updateById=").append(updateById);
//        sb.append(", updateTime=").append(updateTime);
//        sb.append(", serialVersionUID=").append(serialVersionUID);
//        sb.append("]");
//        return sb.toString();
//    }
}